home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / icon tools / iconmiser / iconmiser.doc < prev    next >
Text File  |  1996-04-07  |  8KB  |  185 lines

  1. PROGRAM: IconMiser 2.0
  2.  
  3. AUTHOR:  Todd M. Lewis                 E-MAIL: Todd_Lewis@unc.edu
  4.          2601 Piedmont Drive
  5.          Sanford, NC  27330-9437  USA
  6.  
  7. IconMiser is a utility which monitors the creation of icons. When
  8. a program attempts to create an icon that looks like one on your
  9. hit list, IconMiser substitutes the icon or icon image of your
  10. choice.
  11.  
  12.  
  13. DISTRIBUTION
  14.  
  15. Sure, go ahead.  I didn't write these docs for myself, ya know.
  16.  
  17.  
  18. RUNNING THE PROGRAM
  19.  
  20. The program can be run from Workbench or the CLI.  It can take
  21. three parameters: NOWINDOW, QUIT, and a possible file name.
  22.  
  23.   "Nowindow" tells the program not to bring up the user
  24.              interface.  One way to set up your system is to
  25.              include the line "IconMiser NOWINDOW" in your
  26.              S:User-Startup or S:Startup-Sequence file.
  27.              Another way is to move the IconMiser.prefs file to
  28.              your WBStartup drawer and include the "NOWINDOW"
  29.              tooltype.  ("NOWINDOW=" is necessary for pre-2.0
  30.              systems.)
  31.  
  32.   "Quit"     is useful if you want to unload IconMiser's
  33.              background utility.  This is necessary if you want
  34.              to shut down Workbench.
  35.  
  36. Any other parameter is taken as the name of a configuration file.
  37. If none is given and IconMiser's background utility is not
  38. already running, a configuration file is searched for and loaded
  39. if found.  The program first looks for the file "IconMiser.prefs"
  40. in the current directory, then "ENV:IconMiser/IconMiser.prefs",
  41. and finally "S:IconMiser.prefs".
  42.  
  43.  
  44. WINDOW LAYOUT AND CONTROLS
  45.  
  46. IconMiser presents a window with two icon holding areas labeled
  47. "From" and "To" with attached string gadgets for entering the
  48. names of icons.  (Don't include the ".info" part of the icon file
  49. names.) If you are running 2.04 or above, you can drag icons from
  50. Workbench windows and drop them into the icon drop boxes and
  51. never have to type an icon's file name.
  52.  
  53. The cycle gadget below the icons lets you specify how you want
  54. IconMiser to operate when a program attempts to save an icon with
  55. an image that matches the "From" icon's image.  (The match is
  56. only made on the unselected image.)  You get four choices:
  57.  
  58.   Substitute Image Only  Creates an icon with all the settings of
  59.                          the "From" icon (type, stack size, etc)
  60.                          but uses the image from the "To" icon.
  61.  
  62.   Substitute Whole Icon  Uses the "To" icon (image, position,
  63.                          stack size, type, default tool, etc) in
  64.                          place of the "From" icon.
  65.  
  66.   Use From Icon As Is    Acts as if the image didn't match.  This
  67.                          allows you to temporarily disable
  68.                          substitution on a pair of icons without
  69.                          removing from it from the configuration.
  70.  
  71.   Make No Icon At All    Prevents the creation of the icon
  72.                          altogether.  This is handy for programs
  73.                          that insist on creating icons even if
  74.                          you don't want them to.  Note that you
  75.                          will still have to specify a "To" icon
  76.                          even though it won't be used.
  77.  
  78. Just below the cycle gadget are three pairs of buttons.  They do
  79. the following things:
  80.  
  81.   Prev      These buttons allow you to move back and forth
  82.   Next      through the "From/To" pairs of icons.  There is no
  83.             practical limit to how many pairs of icons you can
  84.             specify, but the "From" icons will be unique.  That
  85.             is to say that if you create a pair of icons and the
  86.             "From" icon's unselected image is identical to that
  87.             of another "From" icon, the other pair is quietly
  88.             removed.
  89.  
  90.   New       These two buttons allow you to create a New pair of
  91.   Delete    icons, or Delete the currently displayed pair.  There
  92.             is no warning on the Delete button, and no UnDo
  93.             function, so don't delete a pair from the list unless
  94.             you really mean to.  You have been warned.
  95.  
  96.   Keep      These buttons allow you to add the new or modified pair
  97.   Revert    of icons, along with their action mode, to the active
  98.             list the program is currently using, or to Revert
  99.             back to the way it was before you started making
  100.             changes.
  101.  
  102. Across the bottom are three more gadgets: Save, Use, and Load.
  103.  
  104.   "Save" saves the configuration (i.e., all the icon pairs and
  105.   their change modes) to "the right place" and closes the window.
  106.   "The right place" is where the configuration was loaded from
  107.   last, or ENVARC:IconMiser/IconMiser.prefs and
  108.   ENV:IconMiser/IconMiser.prefs if those directories exist, or else
  109.   to S:IconMiser.prefs.
  110.  
  111.   "Use" saves the configuration to ENV:IconMiser/IconMiser.prefs if
  112.   it can, then closes the window.
  113.  
  114.   "Load" brings up a file requester (or just a string gadget if you
  115.   are running a pre-2.04 system) for you to specify a configuration
  116.   to load.  Note that the icon pairs in the loaded configuration
  117.   are added to those already in the program.  Only pairs whose
  118.   "From" icon matches a "From" icon in the configuration file
  119.   will be replaced by the pairs in the file.
  120.  
  121.  
  122. MENUS
  123.  
  124. IconMiser presents a Project menu and an Icon menu.  The Project
  125. menu items are:
  126.  
  127.   Open...      Same as the "Load" button on the window.  See above.
  128.  
  129.   Save As...   Brings up a file requester (or a string gadget if you
  130.                are running a pre-2.04 system) for specifying a
  131.                name for the configuration file to save.
  132.  
  133.   About...     Brings up a brief requester with a little
  134.                information about the program.  Same as the help
  135.                key.
  136.  
  137.   Quit         Closes the window (same as the Close Gadget).  It
  138.                does not shut down the background utility.  Icon
  139.                substitutions will still be made.
  140.  
  141. The Icons menu has two menu items: "Save From Icon..." and "Save
  142. To Icon..."  These allow you to save the displayed "From" or "To"
  143. icons to disk where you can then change their attributes or
  144. otherwise do with them as you wish.  Don't specify the ".info"
  145. part of the file names--the system adds that for you.
  146.  
  147.  
  148. TECH NOTES
  149.  
  150. IconMiser works by patching the PutDiskObject vector of
  151. icon.library.  Whenever PutDiskObject is called, the unselected
  152. image of the DiskObject is compared to those of the "From" icons
  153. in the list, and appropriate substitutions are made if a match is
  154. found.
  155.  
  156. There is no fool-proof way of "unpatching" a library vector,
  157. though every attempt is made to keep things safe when unloading
  158. the background utility.  It is necessary to unpatch the library
  159. vector in order to cleanly shutdown Workbench.  Though I have
  160. not been able to make it fail after extensive testing, I cannot
  161. guarantee there will be no problems on your system when running
  162. the command "IconMiser QUIT".  If you run "IconMiser QUIT" and
  163. the background utility is not already running, you will get
  164. a brief message to that effect.
  165.  
  166. The background utility, called PDO_Patch, is imbedded within
  167. IconMiser itself.  It is written out to the T: directory and run
  168. from there if it isn't already running.  Both PDO_Patch and
  169. IconMiser detach themselves from their parent processes, so
  170. including IconMiser in one of the startup scripts doesn't present
  171. a problem when closing down the initial CLI.
  172.  
  173. The configuration file or .prefs file is an unregistered
  174. IFF-conforming file.  It is a CAT ICNM of FORM IMSRs with chunk
  175. types DOBP, DOBF, and DOBT.  DOBP consists of a ULONG containing
  176. the action type for this IMSR.  DOBF and DOBT are byte for byte
  177. copies of the icons as found on disk.
  178.  
  179. Reading and writing of the configuration files requires temporary
  180. creation of icons in the T: directory.  This is normal, but can
  181. generate an interesting display if you have the T: directory
  182. window open when saving a configuration.
  183.  
  184.  
  185.